package com.pajk.user.dal.mapper;

import java.util.List;
import java.util.Map;

import com.pajk.user.dal.model.CreditHisDO;
import com.pajk.user.model.CreditHis;

/**
 * UserService: haihua.chenhh
 * Date: 14-3-14
 * Time: 下午4:21
 */
public interface CreditHisMapper {

    void insertCredit(CreditHisDO creditHisDO);

    List<CreditHisDO> getCreditByPersonId(Long userId);

    CreditHisDO getCreditByActionId(Map<String, Object> map);

    CreditHisDO getCreditByActionIdAndSync(Map<String, Object> map);

    List<CreditHisDO> getCreditByPersonIdAndSync(Map<String, Object> map);

    List<CreditHisDO> getCreditByUserIdAndActionCodeAndDate(Map<String, Object> map);

    int getCreditByUserIdAndActionCodeListAndDate(Map<String, Object> map);

    int getCreditByUserIdAndActionCodePrefixAndDate(Map<String, Object> map);
    
    List<CreditHisDO> getCreditByUserIdAndActionCode(Map<String, Object> map);

    int getCreditByUserIdAndActionCodeList(Map<String, Object> map);

    int getCreditByUserIdAndActionCodePrefix(Map<String, Object> map);
    
    int updateCreditSyncByUserIdAndSync(Map<String, Object> map);

    int selectSumByUserIdAndSync(Map<String, Object> map);

    int updateCreditSyncByActionIdAndSync(Map<String, Object> map);
}
